<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no" >
<meta name="format-detection" content="telephone=no" >
<title></title>
<link rel="stylesheet" href="./css/mobileReset.css">
<style>
    html, body {background-color: #f2f2f2;}
    .class-detail-box {
        padding: 1rem;
    }
    .title {
        font-size: 1.2rem;
        padding-bottom: 1rem;
        color: #333;
    }
    .info {
        font-size: .8rem;
        color: #999;
        padding-bottom: .5rem;
        -webkit-justify-content: space-between;
        -moz-justify-content: space-between;
        justify-content: space-between;
        border-bottom: #ccc 1px solid;
        position: relative;
    }
    .info .time {
        position: absolute;
        top: 0;
        right: 0;
    }
    .content {
        padding-top: 1rem;
    }
    .content img {
        max-width: 100%;
        height: auto;
    }
</style>
</head>
<body>
    <div class="class-detail-box">
        <div class="title"><!-- Jingsdfs副书记的反馈时代峻峰 --></div>
        <div class="dis-flex align-items info">
            <div><span class="num"></span>已学习</div>
            <div class="time"></div>
        </div>
        <div class="content">
        </div>
    </div>
    <script src="./js/jquery-1.8.3.min.js"></script>
    <script src="./js/common.js"></script>
    <script>
        $(function() {
            var runner = {
                id: '',
                init: function() {
                    this.id = utils.getUrlParameter('id');
                    this.getData();
                },
                getData: function() {
                    var data = JSON.stringify({
                        'id': this.id
                    });
                    $.ajax({
                        url: 'https://shophdd.com/hdd/public/news/details',
                        type: "POST",
                        data: data,
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function(respond){
                            if(respond.code === '0000') {
                                // console.log(respond.data);
                                var result = respond.data;
                                $('.title').html(result.title);
                                $('.num').html(result.views);
                                var t = new Date();
                                t.setTime(result.pushTime * 1000);
                                $('.time').html(utils.formatTime(t, '-', true));
                                $('.content').html(result.content);
                            }
                        }
                    });
                }
            };
            runner.init();
        });
    </script>
</body>
</html>